<?php

namespace App\Console\Commands;

use App\Models\Report;
use App\PayAllFee;
use Carbon\Carbon;
use Illuminate\Console\Command;
use App\Models\ParkInfo;
use App\Models\ParkRecord;
use App\Models\PayFee;

/**
 * 过夜车辆查询
 * 凌晨3点执行
 * Class OvernightCar
 * @package App\Console\Commands
 */
class ParkCarSet extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'park:car';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '车场车辆穿行次数';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        //查询当月数据
        $month = date('Y-m',strtotime("-1 days"));
        $parks = ParkInfo::whereIn('park_code', config('custom.report_parks'))
            ->select(['park_code', 'parking_name'])
            ->orderBy('sort_by', 'desc')
            ->get();

        $this->info('车场车辆穿行次数');
    }
}
